package com.crm.common.model.Enum;

/**
 * @author luojie
 * @date 2021/9/13 16:16
 */
public enum ContractStatusEnum {

    NOT_EFFECT("1","未生效"),

    IN_EFFECT("2","生效中"),

    OVER("3","已结束"),

    ABOLISHED("4","已作废"),

    UNEXPECTED_TERMINATION("5","意外终止"),

    HANG_UP("6","挂起");

    private String contractStatusCode;
    private String contractStatusInfo;

    ContractStatusEnum(String contractStatusCode, String contractStatusInfo){
        this.contractStatusCode = contractStatusCode;
        this.contractStatusInfo = contractStatusInfo;
    }

    public static String getValue(String contractStatusCode) {
        for (ContractStatusEnum ele : values()) {
            if(ele.contractStatusCode.equals(contractStatusCode)) return ele.contractStatusInfo;
        }
        return null;
    }

    public String getContractStatus(){
        return contractStatusCode;
    }

    public String getContractStatusInfo(){
        return contractStatusInfo;
    }
}
